package com.htl.exampro.exam.pojo.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.*;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 成绩表
 * </p>
 *
 * @author hehehe
 * @since 2025-05-26
 */
@Data
@TableName("exam_result")
public class ExamResultDO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;
    public static final String RESULT_ID = "result_id";
    public static final String EXAM_ID = "exam_id";
    public static final String USER_ID = "user_id";
    public static final String SCORE = "score";
    public static final String STATUS_ID = "statusId";
    public static final String GRADED_PERSON = "graded_person";
    public static final String GRADED_TIME = "graded_time";
    public static final String CREATED_PERSON = "created_person";
    public static final String CREATED_TIME = "created_time";
    public static final String UPDATED_PERSON = "updated_person";
    public static final String UPDATED_TIME = "updated_time";
    public static final String IS_DELETED = "is_deleted";
    /**
     * 成绩记录ID
     */
    @TableId(value = "result_id", type = IdType.ASSIGN_ID)
    private Long resultId;

    /**
     * 关联考试ID
     */
    @TableField("exam_id")
    private Long examId;

    /**
     * 考生用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 考试成绩
     */
    @TableField("score")
    private Integer score;

    /**
     * 状态: 已报名、缺考、考试中、已交卷、已评分
     */
    @TableField("status_id")
    private Integer statusId;

    /**
     * 开始考试时间
     */
    @TableField("begin_time")
    private LocalDateTime beginTime;

    /**
     * 交卷时间
     */
    @TableField("submit_time")
    private LocalDateTime submitTime;

    /**
     * 试卷批改教师ID
     */
    @TableField("graded_person")
    private Long gradedPerson;

    /**
     * 试卷最终批改完成时间
     */
    @TableField("graded_time")
    private LocalDateTime gradedTime;

    /**
     * 创建人ID
     */
    @TableField(value = "created_person", fill = FieldFill.INSERT)
    private String createdPerson;

    /**
     * 创建时间
     */
    @TableField("created_time")
    private LocalDateTime createdTime;

    /**
     * 修改人ID
     */
    @TableField(value = "updated_person", fill = FieldFill.INSERT)
    private String updatedPerson;

    /**
     * 修改时间
     */
    @TableField("updated_time")
    private LocalDateTime updatedTime;

    /**
     * 逻辑删除标志 0-未删除 1-已删除
     */
    @TableLogic
    @TableField("is_deleted")
    private Boolean isDeleted;
}
